<template>
  <div class="vita-btn" :class="{'vita-btn-normal': type === 'normal', 'vita-btn-primary': type === 'primary', 
  'vita-btn-warn': type === 'warn', 'vita-btn-default': type === 'default', 'vita-btn-disabled': disabled}" @click="handleClick">
    {{text}}
    <slot></slot>
  </div>
</template>

<script>
    
  export default {

  	props: {
  		type: {
  			default: 'default'
  		},
  		disabled: {
  			type: Boolean
  		},
  		text: String
  	},

  	methods: {
  		handleClick() {
  			if (!this.disabled) {
  				this.$dispatch('click')
  			}
  		}
  	}

  }

</script>